Ext.define('DragonApp.view.foundation.ImgAddGrid', {
    extend: 'Ext.grid.Panel',
    alias: 'widget.base-imgadd-grid',

    columnLines: true,

    viewConfig: {
        enableTextSelection: true
    },

    initComponent: function() {
        var me = this;

        me.columns = Ext.Array.merge(
            me.columns, [{
                xtype: 'widgetcolumn',
                width: 100,
                sortable: false,
                hideable: false,
                menuDisabled: true,
                widget: {
                    xtype: 'button',
                    text: '预览',
                    width: 80,
                    iconCls: 'x-fa fa-eye',
                    tooltip: '预览',
                    handler: 'onPreview'
                },
                itemId: 'edit'
            }, {
                xtype: 'widgetcolumn',
                width: 100,
                sortable: false,
                hideable: false,
                menuDisabled: true,
                widget: {
                    xtype: 'button',
                    text: '添加',
                    width: 80,
                    iconCls: "x-fa fa-plus-circle",
                    tooltip: '添加',
                    handler: 'onAdd'
                },
                itemId: 'add'
            }]);

        me.callParent(arguments);
    }
});